package com.cloudbroker.openapi.manage.controller;

import static com.cloudbroker.bcs.platform.dav.common.util.RequestUtil.getSingleParameterMapForBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cloudbroker.bcs.common.util.VOUtil;
import com.cloudbroker.bcs.platform.dav.bizapi.service.base.vo.HSBCPSVO;
import com.cloudbroker.bcs.platform.dav.bizapi.service.common.connect.result.ConnectResult;
import com.cloudbroker.bcs.platform.dav.bizapi.t2service.common.CommonConnectTestT2BizService;
import com.cloudbroker.bcs.platform.dav.common.ext.annotation.SaveLog;

@Controller
public class ConnectTestController {
    
    @Resource
    CommonConnectTestT2BizService commonConnectTestT2;
    
    /**
     * 测试连接
     */
    @ResponseBody
    @RequestMapping("/func_common_connect_test")
    @SaveLog(remark = "测试连接")
    public ConnectResult funcInvestCheckList(HttpServletRequest request, String jsonpcallback) {
        HSBCPSVO form = getSingleParameterMapForBody(request, HSBCPSVO.class);
        return VOUtil.setJsonpResult(commonConnectTestT2.funcCommonConnectTest(form), jsonpcallback);
    }
}
